package com.demo.thread;

import com.demo.dto.User;
import com.mapper.UserServiceMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sun.misc.Lock;


/**
 *
 * 测试多线程
 */
public class TestThread implements Runnable {
    private Logger logger = LoggerFactory.getLogger(TestThread.class);
    /*** 用户接口*/
    private UserServiceMapper userServiceMapper;
    /*** 数据对象*/
    private User user;

    public TestThread() {
    }

    public TestThread(UserServiceMapper serviceMapper, User detail) {
        this.userServiceMapper = serviceMapper;
        this.user = detail;
    }

    @Override
    public void run() {
       int result= userServiceMapper.deleteUserById(user.getId());
       logger.info("==========================="+result+"============================");
    }
}
/**
 * 错误 :
 * 总结 :
 */